// 手机类
class MobilePhone {
    private String brand;
    private String model;
    private String os;
    private double price;
    private int memory;

    // 构造函数
    public MobilePhone(String brand, String model, String os, double price, int memory) {
        this.brand = brand;
        this.model = model;
        this.os = os;
        this.price = price;
        this.memory = memory;
    }

    // 显示手机属性
    public void displayProperties() {
        System.out.println("品牌：" + brand);
        System.out.println("型号：" + model);
        System.out.println("操作系统：" + os);
        System.out.println("价格：" + price);
        System.out.println("内存：" + memory + "GB");
        System.out.println();
    }

    // 自动拨号功能
    public void autoDial(String contact) {
        System.out.println("使用自动拨号功能：");
        System.out.println("  - " + contact);
    }

    // 玩游戏功能
    public void playGame(String game) {
        System.out.println("  - 玩" + game + "游戏。");
    }

    // 播放音乐功能
    public void playMusic(String song) {
        System.out.println("  - 播放歌曲：" + song);
    }

    // 使用所有功能
    public void useAllFunctions(String contact, String game, String song) {
        autoDial(contact);
        playGame(game);
        playMusic(song);
        System.out.println();
    }
}

// 测试类
class PhoneAnalysis {
    public static void main(String[] args) {
        // 创建苹果手机对象
        MobilePhone iphone = new MobilePhone("苹果", "iphoneX", "ios", 8888, 16);
        iphone.displayProperties();
        iphone.useAllFunctions("爷爷的号", "扫雷", "我的中国心");

        // 创建华为手机对象
        MobilePhone huawei = new MobilePhone("华为", "华为荣耀20", "Android", 6666, 16);
        huawei.displayProperties();
        huawei.useAllFunctions("奶奶的号", "扫雷", "北京欢迎你");

        System.out.println("Process finished with exit code 0");
    }
}